Image evaluation device and image evaluation method

ABSTRACT

An image evaluation device includes: a partial area extracting section extracting plural partial areas from an original image; an extracted image generating section generating an extracted image corresponding to each of the partial areas and having pixels whose pixel values correspond to a gradient of pixel values in the image; an autocorrelation calculating section calculating plural autocorrelation coefficients for each extracted images; a representative coefficient value calculating section calculating a representative coefficient value for each of the autocorrelation coefficients among the partial areas; and a checking section checking the quality of the image based on a distribution of the representative coefficient values.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2008-310010, filed on Dec. 4, 2008; the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image evaluation device and an image evaluation method for evaluating the quality of image.

2. Description of the Related Art

Various techniques have been developed to evaluate the quality of image (for instance, the presence/absence of blurring, camera-shake and the like occurred in an image captured by an imaging system such as a camera). Here, a technique for evaluating the quality of image based on an edge of the image has been disclosed (refer to Reference 1 to 3 (which are, JP-A 2006-019874 (KOKAI), JP-A 2006-172417 (KOKAI), and JP-A 2008-123346 (KOKAI), in order)). Reference 1 discloses a technique in which a histogram of an estimated value of edge width is computed for each direction, and if the histogram different among the directions, it is determined that the camera-shake has affected the image. Reference 2 discloses a technique in which an average of edge widths of an original image is estimated to evaluate the degree of blurring. Furthermore, Reference 2 discloses a technique in which direction of the camera-shake is estimated as the direction perpendicular to the direction in which an edge strength is maximum, an autocorrelation is calculated along the camera-shake direction, and a displacement of the minimum value of the autocorrelation is computed as a width of the camera-shake. Reference 3 discloses a technique in which an average of edge widths is computed for each direction, and if all the averages are equal to or less than a threshold value, it is determined that no blurring occurs. Furthermore, Reference 3 discloses a technique in which edge patterns are classified based on a pattern matching of coefficients of DCT, an edge width is estimated based on a representative value of edge widths previously computed for each classification, and a blur region is narrowed down by setting it as a part in which the estimated edge width is wide.

BRIEF SUMMARY OF THE INVENTION

In the techniques disclosed in References 1 to 3, the edge direction is estimated and the edge width along the edge direction is calculated. A method based on the calculation of the edge width is effective for evaluating a simple blurring. However, when the camera-shake has affected the image, the estimation of the edge direction may be incorrect. For this reason, it may be difficult to accurately evaluate the image quality with these methods. Furthermore, with these methods, when ghost images are present and no other defects are significant, a sharpness of edge is unaffected. Accordingly, the defect of the image quality may be undetected.

One of the object of the present invention is to provide an image evaluation device and an image evaluation method which does not depend on estimation gradient direction.

An image evaluation device according to one aspect of the present invention includes: a partial area extracting section extracting a plurality of partial areas from an image; an extracted image generating section extracting a plurality of extracted images corresponding to the plurality of partial areas from the image; an autocorrelation calculating section calculating a plurality of autocorrelation coefficients corresponding to the plurality of extracted images; a representative coefficient value calculating section calculating a representative coefficient value of the plurality of autocorrelation coefficients; and a checking section checking the quality of the image based on a distribution of the representative coefficient values.

An image evaluation method according to one aspect of the present invention includes: extracting a plurality of partial areas from an image; generating a plurality of extracted images corresponding to the plurality of partial areas of which pixel values are gradient of pixel values in the image; calculating a plurality of autocorrelation coefficients corresponding to the plurality of extracted images; calculating a representative coefficient value of the plurality of autocorrelation coefficients; and determining the quality of the image based on a distribution of the representative coefficient values.

In a later-described embodiment of the present invention, a degradation function representing an image degradation in the imaging system is calculated from the original image, and as the degradation function, an autocorrelation of impulse response of the imaging system is used, for instance. The autocorrelation of impulse response is estimated as the degradation function for the following reason.

Many of the image degradations in the imaging system can be modeled by a two-dimensional linear system of which ideal images captured by an imaging system without image degradation are the input and images captured by the imaging system with image degradation are the output. The impulse response of the linear system is spread because of the image degradation such as blurring, camera-shake, ghost images, and afterimage. For instance, if the captured image is blurred, the impulse response is spread isotropically like a Gaussian, and when the camera-shake has affected the image, the response is spread along a line. Furthermore, when the ghost images or afterimages are present, extra peaks other than the one at the origin are observed in the impulse response. Since the extent of impulse response causes the extent of autocorrelation of the impulse response, the image degradation causes extent of the autocorrelation of the impulse response. Therefore, by estimating the autocorrelation of the impulse response as the degradation function and evaluating the degree of the extent, it is possible to check the presence/absence of the image degradation.

In the explanation hereinbelow, it is assumed that a linear operator is used for extracting edge images, and an edge image of an ideal image with no image degradation is called “ideal edge image”, and an edge image extracted from the original image with image degradation is simply called “edge image”.

In the present invention, the degradation function is estimated based on the edge image instead of the original image. Under the assumption where the linear operator is used for extracting the edge image, a linear system for converting the ideal edge image into the edge image is equal to a linear system in which the image degradation is modeled, therefore it is possible to estimate the degradation function using the edge image instead of the original image as described above.

The extent of the autocorrelation coefficients of the edge images in the partial areas can be regarded as sum of the extent due to the image degradation and the extent due to a geometrical structure of the ideal edge images in the respective partial areas. Furthermore, the extent in accordance with the geometrical structure reflects a tendency of a positional relationship between each pixel on which the pixel value is non-zero in the ideal edge image. For instance, at a portion where the edge is linear in the horizontal direction, the autocorrelation coefficients of the edge image are spread horizontally and at a portion where the edge is linear in the vertical direction, the coefficients are spread vertically.

The tendency of the geometrical structure differs among the partial areas, in which when the autocorrelation coefficient of the ideal edge image in each of the partial areas is calculated, the extent in accordance with the structure of each of the partial areas is observed, and the origin is the only point on which the autocorrelation coefficient is always positive regardless of the structure of each of the partial areas. Accordingly, the autocorrelation of the ideal edge image calculated for each of the partial areas can be decomposed into a part of the origin where the correlation always becomes positive, and a sum of parts that depend on the geometrical structure.

Therefore, the autocorrelation of each of the partial areas of the edge image formed by degrading the ideal edge image with the linear system can also be decomposed into a component corresponding to the image degradation and a sum of components corresponding to the geometrical structure. Accordingly, if the components that depend on the geometrical structure are assumed to be positive, the components corresponding to the structure is eliminated by calculating the minimum value of the autocorrelation calculated for each of coordinates among the partial areas of the edge image, so that the component corresponding to the image degradation is computed. Therefore, in the present invention, the autocorrelation of impulse response, namely, the degradation function is estimated by calculating the representative coefficient value such as the minimum value for each of the coordinates of the autocorrelation, as described above.

The pixel value of each pixel in the edge image is a complex number expressing the gradient vector of the original image By this design, the extraction of the edge image is performed through the linear conversion of the original image, which is convenient since it matches with the aforementioned assumption.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an image evaluation device 100 according to an embodiment of the present invention.

FIG. 2 is a diagram showing an example of a gray-scale image.

FIG. 3 is a diagram showing a two-dimensional array corresponding to the gray-scale image.

FIG. 4 is a diagram showing an example of real components of an edge image.

FIG. 5 is a diagram showing an example of the real components of the edge image.

FIG. 6 is a diagram showing an example of imaginary components of the edge image.

FIG. 7 is a diagram showing an example of the imaginary components of the edge image.

FIG. 8 is a block diagram showing an example of a structure of the autocorrelation calculating unit 123.

FIG. 9 is a diagram showing an example of partial areas enumerated by a partial area enumeration unit 151.

FIG. 10 is a diagram showing an example of candidates for partial areas enumerated by a block enumeration unit 153.

FIG. 11 is a diagram showing an example of candidates for areas selected by a partial area selecting unit 154.

FIG. 12A is a diagram showing an example of two-dimensional vectors representing an original image of a partial area.

FIG. 12B is a diagram showing an example of two-dimensional vectors representing real components of an edge image.

FIG. 12C is a diagram showing an example of two-dimensional vectors representing imaginary components of the edge image.

FIG. 13A is a diagram showing an example of gradation pattern representing the original image of the partial area.

FIG. 13B is a diagram showing an example of gradation pattern representing the real components of the edge image.

FIG. 13C is a diagram showing an example of gradation pattern representing the imaginary components of the edge image.

FIG. 14A is a diagram showing an example of gradation pattern of autocorrelation coefficients.

FIG. 14B is a diagram showing an example of gradation pattern of the autocorrelation coefficients.

FIG. 14C is a diagram showing an example of gradation pattern of the autocorrelation coefficients.

FIG. 14D is a diagram showing an example of gradation pattern of the autocorrelation coefficients.

FIG. 15A is a diagram showing an example of two-dimensional array representing the autocorrelation coefficients.

FIG. 15B is a diagram showing an example of two-dimensional array representing the autocorrelation coefficients.

FIG. 15C is a diagram showing an example of two-dimensional array representing the autocorrelation coefficients.

FIG. 15D is a diagram showing an example of two-dimensional array representing the autocorrelation coefficients.

FIG. 16A is a diagram showing a gradation pattern of degradation function T (p, q) calculated from the autocorrelation coefficients.

FIG. 16B is a diagram showing a two-dimensional array representing the degradation function T (p, q) calculated from the autocorrelation coefficients.

FIG. 17 is a block diagram showing an example of a structure of the extent width calculating unit 125.

FIG. 18 is a diagram showing an example of per-distance sum S(ν) of a degradation function calculated by the per-distance sum calculating unit 161.

FIG. 19 is a diagram showing an example of a gray-scale image.

FIG. 20 is a diagram showing an example of a degradation function.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

FIG. 1 is a block diagram showing an image evaluation device 100 according to an embodiment of the present invention. The image evaluation device 100 includes an original image input unit 110, an image evaluation unit 120, a display unit 130, and an input unit 140.

The image evaluation device 100 can be structured by incorporating image evaluation software into a computer, so that the explanation will be made hereinafter by assuming that such a structure is made. However, it is also possible to structure the image evaluation device 100 using dedicated hardware, an aggregate of dedicated hardware, or a computer network for distributed processing. The image evaluation device 100 can adopt, not only the structure cited here, but also various structures.

The original image input unit 110 is an input device to input data of an original image. The image evaluation unit 120 is for evaluating the quality of the original image (for instance, the presence/absence of blurring, camera-shake and the like occurred in an image captured by an imaging system such as a camera), and includes a gray-scale image generating unit 121, an edge image generating unit 122, an autocorrelation calculating unit 123, a degradation function estimating unit 124, a extent width calculating unit 125, and a quality checking unit 126. Note that the image evaluation unit 120 can be structured by a combination of a CPU (Central Processing Unit) and software. The display unit 130 is a display device that displays an image and the like such as, for instance, a CRT and an LCD. The input unit 140 is an input device to input information such as, for instance, a keyboard and a mouse.

It is set such that the original image in the present embodiment is a color image or a gray-scale image whose number of pixels in the horizontal direction and the vertical direction are respectively w and h. The color image can be represented as a combination of two-dimensional arrays R (x, y), G (x, y), and B (x, y) of luminance values of a red component, a green component, and a blue component. The gray-scale image can be represented as a two-dimensional array I (x, y) of a luminance value.

Here, x and y indicate coordinates in the horizontal direction and in the vertical direction, respectively. In the coordinates x, y, the right direction and the downward direction are respectively set as positive directions. Note that the coordinates x, y are represented by using a pixel as a unit.

In the present embodiment, the luminance values R (x, y), G (x, y), B (x, y), and I (x, y) are set to be represented by an integer from 0 to 255. For instance, a gray-scale image shown in FIG. 2 is represented as a two-dimensional array shown in FIG. 3.

The gray-scale image generating unit 121 gray-scales the original image (color image) when the original image is the color image. As a result of this, the two-dimensional array I (x, y) of the luminance value is generated, similar to the case where the original image is gray-scale. For example, the gray-scale is performed in accordance with the following expression (1).

I (x, y)=max (0, min (I _(max) , W _(R) R (x, y)+W _(G) G (x, y)+W _(B) B (x, y)))   expression (1)

Note that W_(R), W_(G), and W_(B) are positive constants for weighting the red component, the green component, and the blue component, and min (x₁, . . . x_(n)) and max (x₁, . . . x_(n)) indicate the minimum value of x₁, . . . x_(n), and the maximum value of x₁, . . . x_(n), respectively. I_(max) is the upper limit value of the luminance.

The expression (1) indicates, as in the following expression (2), that the two-dimensional array I (x, y) is represented by the weighting sum of the two-dimensional arrays R (x, y), G (x, y) and B (x, y). Both min and max are for ensuring that the calculated value of the two-dimensional array I (x, y) is between the upper limit (I_(max)) and the lower limit (0).

I (x, y)=W _(R) ·R (x, y)+W _(G) ·G (x, y)+W _(B) ·B (x, y)   expression (2)

The edge image generating unit 122 generates an edge image from the gray-scale image. A combination of the edge image generating unit 122 and a later-described extracted image extracting unit 156 works as an extracted image generating section that generates a plurality of extracted images corresponding to a plurality of partial areas. The gray-scale image can be either the original image itself, or the gray-scale image generated from the original image (color image).

The edge image is, for instance, an image having pixels whose pixel values correspond to a gradient of pixel values of the original image (gray-scale image). The pixel values of the edge image here indicate the gradient of pixel values of the gray-scale image. Here, the pixel value of the edge image (value of gradient) is set to a complex number. Namely, the edge image generating unit 122 calculates a gradient vector of each pixel of the gray-scale image, and generates the edge image in which a horizontal component and a vertical component of the vector are respectively set to a real component and an imaginary component of the pixel.

A gradient vector g (x, y) in coordinates (x, y) can be defined by the following expression (3).

g (x, y)=(I (x+1, y)−I (x−1, y), I (x, y+1)−I (x, y−1)   expression (3)

Therefore, a pixel value E (x, y) of the edge image in the coordinates (x, y) can be calculated in accordance with the following expression (4).

E (x, y)=(I (x+1, y)−I (x−1, y)+j·(I (x, y+1)−I (x, y−1))   expression (4)

Note that “j” is set to indicate an imaginary unit.

Here, in the calculation of pixel value E (x, y), when the coordinates (x+1, y) position on the right side of a right edge of the image, namely, when x+1>w, it is set that I (x+1, y)=I (w−1, y). In like manner, when x−1<0, it is set that I (x−1, y)=I (0, y). Furthermore, when y+1>h, it is set that I (x, y+1)=I (x, h−1). When y−1<0, it is set that I (x, y−1)=I (x, 0).

Since a pixel value is not defined on the outside of the gray-scale image, the gradient at the edge of the image cannot be calculated. By setting the pixel value on the outside of the image to have the same value as the pixel value in the periphery of the image, it becomes possible to calculate the gradient at the edge of the image.

Real components and imaginary components as a result of calculating the edge image in the edge image generating unit 122 from the image shown in FIG. 2 and FIG. 3 are shown in FIG. 4 and FIG. 5, and in FIG. 6 and FIG. 7, respectively. In FIG. 4 and FIG. 6, magnitudes of the respective components are shown by gradation. A pixel whose respective components are close to zero is indicated by a gray color, a pixel in which the magnitudes of the respective components are large is indicated by a brighter color, and a pixel in which the magnitudes of the respective components are small is indicated by a darker color.

The expression (4) represents an expanded gradient coefficient (edge image) in which gradients in two directions (horizontal direction and vertical direction) are set to the real component and the imaginary component.

As above, the amount corresponding to a clarity of the edge (particularly, the amount having an absolute value whose magnitude corresponds to the clarity of the edge) can be used instead of the pixel value represented by the expression (4). For instance, as in the following expressions (4a), (4b), and (4c), it is possible to define the edge image using an image in which a gradient in one direction (horizontal direction, vertical direction, or diagonal direction) itself is set as a pixel value.

E (x, y)=I (x+1, y)−I (x−1, y)   expression (4a)

E (x, y)=I (x, y+1)−I (x, y−1)   expression (4b)

E (x, y)=I (x+1, y+1)−I (x−1, y−1)   expression (4c)

The edge image represented by the expression (4) is defined by a linear amount corresponding to a difference in luminance of pixels adjacent to a pixel of coordinates (x, y). On the contrary, it is also possible to define the edge image using a non-linear amount (for instance, an amount computed by non-linear converting a difference in luminance). For example, it is possible to create a non-linear edge image by setting a norm of the gradient vector g (x, y) to E (x, y), and the like.

As described above, the amount having an absolute value whose magnitude corresponds to the clarity of the edge (in other words, the amount having a large absolute value which intensively appears on the periphery of the edge of the original image) can be used for the definition of the edge image.

The autocorrelation calculating unit 123 calculates a second-order or higher of an autocorrelation coefficient of the edge image in each of n partial areas R₁, . . . R_(n). FIG. 8 is a block diagram showing an example of a structure of the autocorrelation calculating unit 123. The autocorrelation calculating unit 123 includes a partial area enumeration unit 151, and a calculating unit of autocorrelation in area 152.

The partial area enumeration unit 151 enumerates (extracts), from the original image, n partial areas R₁, . . . R_(n) including a certain number or more of pixels whose pixel values are largely different from a representative pixel value. The partial area enumeration unit 151 works as a partial area extracting section that extracts a plurality of partial areas from the original image. FIG. 9 shows an example of partial areas R₁, . . . R₄ enumerated by the partial area enumeration unit 151. The calculating unit of autocorrelation in area 152 calculates, for each of partial areas R_(k), an autocorrelation coefficient C_(k) (p, q) of the pixel value E (x, y) of the edge image.

Note that each of the partial areas R_(k) is a quadrangle having a width of a and a height of b, and coordinates at the upper-left corner of the kth quadrangle R_(k) are set to (x_(k), y_(k)). Furthermore, p and q indicate coordinates in the horizontal direction and in the vertical direction, respectively, and take integers within the following range in which a pixel is used as a unit.

p_(min)≦p≦p_(max)

q_(min)≦q≦q_(max)

p _(min)=−Floor (a/2), p _(max) =p _(min) +a−1

q _(min)=−Floor (b/2), q _(max) =q _(min) +b−1

Note that Floor (x) is set to indicate the maximum value of integers equal to or less than x.

The minimum value p_(min) and the maximum value p_(max) are set so that a substantially center of each of the partial areas R_(k) corresponds to the origin (0, 0). When the width a and the height b are odd numbers, the center of the partial area R_(k) coincides with the origin (0, 0). When the width a and the height b are even numbers, the center of the partial area R_(k) does not correspond to the pixel (the center is disposed between the pixels), so that in order to make the origin (0, 0) correspond to the pixel, the origin (0, 0) is displaced from the center.

The partial area enumeration unit 151 includes a block enumeration unit 153, a partial area selecting unit 154, and a partial area selecting unit 155. The block enumeration unit 153 enumerates t blocks B₁, . . . B_(t). The partial area selecting unit 154 selects, from the original image, m candidates for partial areas D₁, . . . D_(m), within the blocks B₁, . . . B_(t), including a certain number or more of pixels whose pixel values are largely different from a representative pixel value. The partial area selecting unit 155 further selects n partial areas R₁, . . . R_(n) from the candidates for partial areas D₁, . . . D_(m).

The block enumeration unit 153 enumerates t blocks B₁, . . . B_(t) from the image. FIG. 10 shows an example of candidates for partial areas enumerated by the block enumeration unit 153.

In the block enumeration unit 153, the number t of the blocks B₁, . . . B_(t) each having a width of a and a height of b and coordinates (x_(B, 1), y_(B, 1)), . . . (x_(B, t), y_(B, t)) at the upper-left corners of the blocks are calculated in accordance with the following method.

A. t_(horz) and t_(vert) are calculated through the following expressions.

t _(horz)=Floor (w/a)

t _(vert)=Floor (h/b)

t=t _(horz) ·t _(vert)

Specifically, the original image (width: w, height: h) is basically divided into the blocks B₁, . . . B_(t) arranged as t_(horz) blocks horizontal by t_(vert) blocks vertical. Floor is used, when (w/a) and (h/b) cannot be divided, to round down a value below decimal point to the integer.

B. k is initialized to 1.

C. Coordinates (x_(B, k), y_(B, k)) at the upper-left corner of the block B_(k) are calculated as follows.

(1) The following processing is repeated while changing a value of i_(vert) from 0 to (t_(vert)−1).

(2) The following processing is repeated while changing a value of i_(horz) from 0 to (t_(horz)−1).

1) x_(B, k) is calculated: x_(B, k)=a·i_(horz).

2) y_(B, k) is calculated: y_(B, k)=b·i_(vert).

3) k is increased by 1.

By changing i_(vert) and i_(horz), k is changed between 1 to t. As a result of this, coordinates (x_(B, 1), y_(B, 1)), . . . (x_(B, t), y_(B, t)) at the upper-left corners of all the blocks B₁, . . . B_(t) are calculated.

The partial area selecting unit 154 selects the number m of partial areas D₁, . . . D_(m) each having a width of a and a height of b and coordinates (x_(D, 1), y_(D, 1)), . . . (x_(D, m), y_(D, m)) at the upper-left corners of the areas in accordance with the following method.

A. It is set that m=0.

B. The following processing is repeated while changing a value of k from 1 to t.

(1) A mean value of the pixel values I (x, y) of the original image in the block B_(k) is calculated and is set as a representative pixel value G_(k) of the original image. The mean value is a value of data located at a center when the pieces of data are arranged in order. When the number nn of data is an odd number, a value of the [(nn+1)/2] th smallest (substantially the central) data is the mean value. Furthermore, when the number nn of data is an even number, an average of the Floor [nn/2] th smallest (central) data and the Floor [(nn/2)+1] th smallest (central) data is the mean value. The mean value can be regarded as the representative pixel value in the block B_(k).

(2) Threshold values θ_(1, k) and θ_(2, k) are calculated in accordance with the following expressions.

θ_(1, k)=α₁ ·G _(k)

θ_(2, k)=α₂ ·G _(k)

Note that α₁ and α₂ are predetermined constants which satisfy 0<α₁<1<α₂.

(3) The number e_(k) of pixels having pixel values which are out of the range of the pixel values determined based on the representative pixel value being the pixel value I (x, y) of the original image in the block B_(k) satisfying the following condition, is counted.

I (x, y)≦θ_(1, k), or θ_(2, k) ≦I (x, y)

(4) When e_(k)≧β·a·b is satisfied, the following processing is conducted. Note that β is a predetermined constant which satisfies 0<β<1.

1) m is increased by 1.

2) It is set that x_(D, m)=x_(B, k), y_(D, m)=y_(B, k)

Through the above processing, the partial area selecting unit 154 selects, from the original image, the candidates for partial areas D₁, . . . D_(m), within the blocks B₁, . . . B_(t), including a certain number or more of pixels whose pixel values are largely different from the representative pixel value. Specifically, the partial area selecting unit 154 selects a candidate for partial area D_(k) having the number e_(k) of pixels whose pixel values are out of the range of the threshold values θ_(1, k) to θ_(2, k) greater than a predetermined ratio β. FIG. 11 shows an example of candidates for areas selected by the partial area selecting unit 154.

The partial area selecting unit 155 selects the n partial areas R₁, . . . R_(n) each having a width of a and a height of b from the candidates for partial areas D₁, . . . D_(m), and coordinates (x₁, y₁), . . . (x_(n), y_(n)) at the upper-left corners of the areas. The selection can be performed randomly. In this case, the partial areas R₁, . . . R_(n) can be selected by using a pseudo-random number k1 represented by the following expression (11). A candidate for partial area D_(k1) is selected as the partial area R_(k).

k1={[N (k−1)] mod m}+1   expression (11)

Note that n is a predetermined number. Furthermore, N is a prime number and can be set as N=9973, for instance. “x mod y” indicates a remainder as a result of dividing x by y.

It is also possible to regularly select the partial areas R₁, . . . R_(n) from the candidates for partial areas D₁, . . . D_(m). For instance, it is possible to select the partial areas R₁, . . . R_(n) by using an integer k1 represented by the following expression (11a). A candidate for partial area D_(k1) is selected as the partial area R_(k).

k1=Floor [(m−1) (k−1)/(n−1)]+1   expression (11a)

Coordinates (x_(k), y_(k)) at the upper-left corner of the selected partial area D_(k) is represented as follows.

(x _(k) , y _(k))=(x _(D, k1) , y _(D, k1))

The selection by the partial area selecting unit 155 is conducted for aligning the number n of the partial areas R₁, . . . R_(n). The number m of the candidates for partial areas D₁, . . . D_(m) selected by the partial area selecting unit 154 depends on the original image. Specifically, the number depends on a ratio of areas, included in the original image, including a certain number or more of pixels whose pixel values are largely different from the representative pixel value. It is also possible to align the number n of the partial areas R₁, . . . R_(n) by interrupting the selection by the partial area selecting unit 154 in the middle thereof. In the present embodiment, after the selection by the partial area selecting unit 154 is completed, the number n of the partial areas R₁, . . . R_(n) is adjusted by the partial area selecting unit 155.

As described above, various methods, which can be performed randomly or regularly, can be adopted for the selection of the partial areas R₁, . . . R_(n) by the partial area selecting unit 155. As the entire partial area enumeration unit 151, various methods can be adopted for enumerating, from the original image, the partial areas R₁, . . . R_(n) including a certain number or more of pixels whose pixel values are largely different from the representative pixel value.

The calculating unit of autocorrelation in area 152 calculates, for each of the partial areas R_(k), the autocorrelation coefficient C_(k) (p, q) of the pixel value E (x, y) of the edge image. The calculating unit of autocorrelation in area 152 includes an extracted image extracting unit 156, and a calculating unit of autocorrelation of extracted image 157.

The extracted image extracting unit 156 extracts, from the edge image, partial edge images U₁, . . . U_(n) corresponding to the respective partial areas R₁, . . . R_(n). The calculating unit of autocorrelation in area 152 calculates an autocorrelation coefficient corresponding to each of the extracted images. As described above, the partial area R_(k) is the area having a width of a and a height of b and coordinates at the upper-left corner of (x_(k), y_(k)). The extracted image extracting unit 156 substitutes a pixel value E (x_(k)+x, y_(k)+y) of the edge image by setting it as a pixel value F_(k) (x, y) located x pixels to the right and y pixels down from the upper-left corner of the extracted image, as shown by the following expression.

F _(k) (x, y)=E (x _(k) +x, y _(k) +y)

FIG. 12A to FIG. 12C show an example of two-dimensional vectors representing an original image of a partial area, real components, and imaginary components of an edge image generated from the original image, respectively. FIG. 13A to FIG. 13C show an example of gradation pattern representing the original image of the partial area, the real components, and the imaginary components of the edge image generated from the original image, respectively. In the original image, the pixel value 0 is indicated by black, and the pixel value 255 is indicated by white. In the edge image, a pixel in which respective components of the extracted image are close to zero is indicated by a gray color, a pixel in which the magnitudes of the respective components are large is indicated by a brighter color, and a pixel in which the magnitudes of the respective components are small is indicated by a darker color.

The calculating unit of autocorrelation of extracted image 157 calculates a second-order or higher of an autocorrelation coefficient C_(k) (p, q) of the extracted image. The calculating unit of autocorrelation of extracted image 157 works as an autocorrelation calculating section that calculates the autocorrelation coefficient for each of the partial areas R₁, . . . R_(n). The calculating unit of autocorrelation of extracted image 157 calculates the autocorrelation coefficient C_(k) (p, q) for each of the integers p and q satisfying p_(min)<p<p_(max), q_(min)<q<q_(max), through the following expression (21), for instance.

C _(k) (p, q)=η·Σ_(y=0) ^(b)Σ_(x=0) ^(a) F _(k) (x, y)·CJ (F _(k) ((p+x) mod a, (q+y) mod b))/Σ_(y=0) ^(b)Σ_(x=0) ^(a) F _(k) (x, y)·CJ (F _(k) (x, y))   expression (21)

Here, η is a predetermined constant (255, for instance). Furthermore, CJ (x) represents a conjugate complex number of x.

The expression (21) is basically represented by the following expression (22).

C _(k) (p, q)=η·Σ_(y=0) ^(b)Σ_(x=0) ^(a) F _(k) (x, y)·CJ (F _(k) (p+x, q+y)/Σ_(y=0) ^(b)Σ_(x=0) ^(a) F _(k) (x, y)·CJ (F _(k) (x, y))   expression (22)

The reason why “(p+x) mod a” and “(q+y) mod b” are set in the expression (21) is to easily perform the calculation of the autocorrelation coefficient C_(k) (p, q) by defining E (x, y) on the outside of the area of the original extracted image. Specifically, the autocorrelation coefficient C_(k) (p, q) is calculated by assuming that the extracted images are arranged vertically and horizontally.

FIG. 14A to FIG. 14D show an example of gradation pattern of autocorrelation coefficients calculated by the calculating unit of autocorrelation of extracted image 157 (FIG. 14A to FIG. 14D correspond to the partial areas R₁ to R₄, respectively). FIG. 15A to FIG. 15D show an example of two-dimensional array representing the autocorrelation coefficients (FIG. 15A to FIG. 15D correspond to the partial areas R₁ to R₄, respectively). In the gradation pattern of the autocorrelation coefficients, a value equal to or less than 0 is indicated by black, and a value greater than 0 is indicated by the brightness in accordance with the magnitude of the value.

The expressions (21) and (22) take into consideration that the pixel value F_(k) (x, y) of the extracted image is the complex number. If the pixel value F_(k) (x, y) is a real number (for instance, if the pixel value E (x, y) of the edge image can be represented by the expressions (4a) to (4c)), an arithmetic expression of the autocorrelation coefficient C_(k) (p, q) is simplified. For instance, the expression (22) is represented as the following expression (23).

C _(k) (p, q)=η·Σ_(y=0) ^(b)Σ_(x=0) ^(a) F _(k) (x, y)·F _(k) (p+x, q+y)/Σ_(y=0) ^(b)Σ_(x=0) ^(a) F _(k) (x, y)·F _(k) (x, y)   expression (23)

As the calculation method of autocorrelation coefficient in the calculating unit of autocorrelation of extracted image 157, not only the aforementioned method but also various methods can be adopted as long as the autocorrelation coefficient C_(k) (p, q) of the edge image in the partial area can be calculated. For example, the autocorrelation coefficient C_(k) (p, q) can be calculated by Fourier-transforming the pixel value F_(k) (p, q) to calculate a spectrum of the pixel value F_(k) (p, q) (to resolve a spatial frequency) and then inverse-Fourier-transforming a square of an absolute value of the spectrum.

The degradation function estimating unit 124 estimates a degradation function T (p, q) by calculating the representative coefficient value for each of the coordinates (p, q) of the autocorrelation coefficients C_(k) (p, q) (for each of the pixels). The degradation function estimating unit 124 works as a representative coefficient value calculating section that creates the representative coefficient value of the plurality of autocorrelation coefficients in each of the plurality of corresponding pixels. The degradation function T (p, q) is a function representing the degree of degradation of the image caused by an imaging system used for capturing the original image. The degradation function estimating unit 124 calculates the degradation function T (p, q) in the coordinates (p, q) in accordance with the following expression.

T (p, q)=min (C ₁ (p, q), . . . C _(n) (p, q))

Note that min (x₁, . . . x_(n)) indicates the minimum value of x₁, . . . x_(n). FIG. 16A and FIG. 16B show a gradation pattern and a two-dimensional array of degradation function T (p, q) calculated from the autocorrelation coefficients shown in FIGS. 14A to 14D and FIGS. 15A to 15D.

The autocorrelation coefficients C_(k) (p, q) have a distribution corresponding to the degree of correlation of the pixel values F_(k) (p, q). In the origin (0, 0), the correlation between the same pixels is calculated, and it takes the maximum value (η). A point other than the origin takes a value corresponding to the correlation of offsets p and q in the horizontal direction and the vertical direction. For example, if the edge (boundary of bright and dark) is clear in the original image, large pixel values F_(k) (p, q) are aligned linearly along the edge direction. Furthermore, if the edge (boundary of bright and dark) is not clear in the original image, relatively large pixel values F_(k) (p, q) are aligned with width along the edge direction.

Specifically, it is possible to determine the quality of the original image based on the width of the autocorrelation coefficients C_(k) (p, q). Generally, the determination of the edge direction is required to obtain the width. Since no determination of the edge direction is required in this embodiment, the degradation function T (p, q) is calculated by calculating a plurality of autocorrelation coefficients C_(k) (p, q) from the original image and obtaining the representative coefficient value of the plurality of autocorrelation coefficients C_(k) (p, q) for each of the coordinates (p, q). As above, by obtaining the representative coefficient values of the autocorrelation coefficients C_(k) (p, q), it becomes possible to alleviate the influence corresponding to the edge direction (to eliminate the autocorrelation depending on the geometrical structure of the image), and thus to eliminate the necessity of determining the edge direction.

The reason why the component corresponding to the geometrical structure of the image can be eliminated by setting the minimum value of the autocorrelation coefficients C_(k) (p, q) for each of the coordinates (p, q) to the degradation function T (p, q) is because the autocorrelation coefficient C_(k) (p, q) can be decomposed into the component corresponding to the image degradation and the sum of components that depend on the geometrical structure, in which if the components that depend on the geometrical structure are assumed to be positive, by calculating the minimum value for each of the coordinates of the autocorrelation calculated for each of the partial areas of the edge image, the components that depend on the structure can be eliminated.

It is also possible to calculate the degradation function T (p, q) through the following expression.

T (p, q)=max (0, min (C ₁ (p, q), . . . C _(n) (p, q)))

This expression prevents the value of the degradation function T (p, q) from being less than 0.

The degradation function T (p, q) can also be calculated as an order statistic represented by the following expression.

T (p, q)=odr (C ₁ (p, q), . . . C _(n) (p, q);r)

r=Floor (γ·(n−1))+1

Note that odr (x₁, . . . x_(n);r) indicates the ‘r’ th smallest value in x₁, . . . x_(n), and γ indicates a predetermined real constant which is not less than 0 nor more than 1. For instance, if it is set that γ=0.05, the degradation function T (p, q) can be defined by setting the numberth autocorrelation coefficient C_(k) (p, q) counted from the minimum value as the representative coefficient value, the number corresponding to 5% of the total number of values. Floor (x) is set to indicate the maximum value of integers equal to or less than x.

The degradation function estimating unit 124 can also calculate the degradation function T (p, q) by selecting a larger value between the order statistic odr (C₁ (p, q), . . . (p, q);r) of autocorrelation coefficient and 0, as represented by the following expression. When the order statistic odr (C₁ (p, q), . . . C_(n) (p, q);r) is less than 0, it is replaced with 0.

T (p, q)=max (0, odr (C ₁ (p, q), . . . C _(n) (p, q);r))

r=Floor (γ·(n−1))+1

As described above, by using the representative coefficient value of the autocorrelation coefficients C₁ (p, q), . . . C_(n) (p, q), the degradation function T (p, q) from which the autocorrelation depending on the geometrical structure (for instance, the arrangement of the edge) is eliminated, is calculated. Accordingly, the degradation function T (p, q) results in including a lot of components of autocorrelation corresponding to the image degradation, which enables to easily calculate the degree of image degradation from the degradation function T (p, q).

For the calculation of the degradation function T (p, q) from the autocorrelation coefficients C₁ (p, q), . . . C_(n) (p, q), not only the example cited here but also any method can be adopted as long as the autocorrelation corresponding to the image degradation can be computed by eliminating the autocorrelation depending on the geometrical structure.

The extent width calculating unit 125 calculates a extent width of the degradation function T (p, q). The extent width calculating unit 125 works as an extent width calculating section that calculates an extent width of the distribution of the representative coefficient values. FIG. 17 is a block diagram showing an example of a structure of the extent width calculating unit 125. The extent width calculating unit 125 includes a per-distance sum calculating unit 161, and a per-distance sum evaluation unit 162.

The per-distance sum calculation unit 161 calculates per-distance sums of the degradation function for each interval of distance ν from the origin (0, 0). The interval is set as [0, 1), [1, 2), . . . [ν, ν+1), [ν_(max), ν_(max)+1). Here, it is set that [x, y) indicates an interval of real value which is not less than x and less than y, ν indicates an integer, and ν_(max) is defined by the following expression.

ν_(max)=Ceil ((max (−p _(min) , p _(max))²+max (−q _(min) , q _(max))²)^(1/2))−1

Note that Ceil (x) is set to indicate the minimum value of integers equal to or more than x.

The per-distance sum of the degradation function at an interval of distance [ν, ν+1) is represented as S(ν).

ν_(max) indicates the maximum distance from the origin (0, 0) to the periphery of the extracted image, and is basically represented by the following expression.

ν_(max)=(P _(max) ² +q _(max) ²)^(1/2)−1

The expression is complicated since it is dealt with a case where the absolute value of “P_(min)” is greater than “P_(max)”, and ν_(max) is set as an integer.

The per-distance sum calculation unit 161 calculates the per-distance sum S(ν) of the degradation function in accordance with the following method.

A. It is set that S(ν)=0 for each integer ν satisfying 0≦ν≦ν_(max).

B. The following processing is repeated for each integer q satisfying q_(min)≦q≦q_(max).

(1) The following processing is repeated for each integer p satisfying p_(min≦p≦p) _(max).

1) ν is calculated: ν=Floor ((p²+q²)^(1/2)).

2) T (p, q) is added to S(ν).

FIG. 18 shows an example of the per-distance sum S(ν) of the degradation function calculated by the per-distance sum calculation unit 161. When the distance ν is from 0 to 2, the per-distance sum S(ν) takes a value of 255, 480, and 0. When the distance ν is equal to or more than 2, the per-distance sum S(ν) is 0.

The per-distance sum evaluation unit 162 calculates a extent width λ of the degradation function based on the per-distance sum of the degradation function. The per-distance sum evaluation unit 162 calculates the extent width λ in accordance with the following method.

A. It is set that S=0.

B. It is set that λ=ν_(max).

C. The following processing is repeated until it is satisfied that λ=0 or S≧θ.

(1) S(λ) is added to S: S=S+S(λ)

This is the same as obtaining the area of function of the per-distance sum S(ν) of the degradation function.

(2) 1 is subtracted from λ.

Note that θ is a predetermined real constant value.

In the extent width calculating unit 125, a extent width S of the degradation function can also be calculated in accordance with the following expression.

S={Σ_(q=qmin) ^(qmax)Σ_(p=pmin) ^(pmax) T (p, q)·(p ² +q ²)/Σ_(q=qmin) ^(qmax)Σ_(p=pmin) ^(pmax) T (p, q)}^(1/2)

As a calculation method of the extent width of the degradation function in the extent width calculating unit 125, not only the aforementioned method but also any method can be adopted as long as a value that reflects a magnitude of the extent of the degradation function can be calculated with the method.

The quality checking unit 126 determines the quality of the original image by comparing the extent width λ with a predetermined threshold value Λ. The quality checking unit 126 works as a checking section that determines the quality of the image based on the distribution of the representative coefficient values. The quality checking unit 126 determines that the original image is non-defective when the extent width λ is equal to or less than the threshold value Λ, and it determines that the original image is defective when the extent width λ is greater than the threshold value Λ.

In the present embodiment, the degradation function T (p, q) is calculated in the degradation function estimating unit 124, and the extent width of the degradation function is calculated in the extent width calculating unit 125 for all of the coordinates (p, q) in a range of p_(min)≦p≦p_(max), q_(min)≦q≦q_(max). However, there is no problem if the degradation function T (p, q) is calculated for only a part of the coordinates (p, q) in the range, and the extent width is calculated based on the function.

As described above, in the present embodiment, the degradation function T (p, q) that reflects the image degradation corresponding to the defect caused by blurring, camera-shake and the like is estimated, and the extent width of the degradation function T (p, q) is used for the determination of presence/absence of the defect. In the present embodiment, advantages as described below can be attained.

(1) The extent width of the degradation function T (p, q) is not influenced by a contrast of the image, so that even when the contrast of the image is varied, it is possible to accurately evaluate the image quality.

(2) The estimation of the edge direction is not required, so that there arises no problem caused by an error in the estimation of the edge direction.

(3) Even when the ghost images are present, it is possible to detect the extent of the degradation function caused by the ghost images as the defect of the image quality. For instance, double image occurs in an image shown in FIG. 19, and from this image, a degradation function as shown in FIG. 20 is calculated. In this example, a peak of the degradation function can be observed not only in the vicinity of the origin but also on the lower right and upper left, so that it is possible to detect an abnormality of the image as the extent of the degradation function.

(4) The magnitude of spatial frequency is not used for the evaluation of sharpness, so that even when there is a problem in a quantization method of pixel values or even when there is generated a noise including a high frequency component at the time of capturing an image, there is no chance of overestimating the sharpness based on an image in which blurring or the like occurs.

OTHER EMBODIMENTS

Embodiments of the present invention are not limited to the above embodiment and can be expanded or modified, and the expanded or modified embodiment is also included in the technical scope of the present invention. 

1. An image evaluation device, comprising: a partial area extracting section extracting a plurality of partial areas from an image; an extracted image generating section extracting plural extracted images corresponding to plural partial areas from the image; an autocorrelation calculating section calculating autocorrelation coefficients for each extracted image; a representative coefficient value calculating section calculating a representative coefficient value of the autocorrelation coefficients among the partial areas; and a checking section checking the quality of the image based on a distribution of the representative coefficient values.
 2. The image evaluation device according to claim 1, further comprising, a extent width calculating section calculating a extent width of the distribution of the representative coefficient values, wherein the checking section determines the quality of the image based on the extent width.
 3. The image evaluation device according to claim 2, wherein the checking section determines the quality of the image by comparing the extent width with a predetermined threshold value.
 4. The image evaluation device according to claim 1, wherein the representative coefficient value of the plurality of autocorrelation coefficients is the minimum value of the plurality of autocorrelation coefficients or a value of autocorrelation coefficients in predetermined order from the minimum.
 5. The image evaluation device according to claim 4, wherein the representative coefficient value of the plurality of autocorrelation coefficients is replaced with a value equal to or greater than 0 if the value is less than
 0. 6. The image evaluation device according to any one of claims 1 to 5, wherein the extracted image is extracted by extracting an edge image in the partial area.
 7. The image evaluation device according to claim 6, wherein pixel value of each pixel in the edge image represents the gradient of pixel value in a predetermined direction or a pair of directions on the pixel.
 8. The image evaluation device according to claim 1, wherein the extracted image generating section comprises, an image generating section generating an image having pixels whose pixel values correspond to the gradient of pixel values in the image; and wherein an extracted image extracting section extracting extracted images for each of the partial areas, from the generated image.
 9. The image evaluation device according to claim 1, wherein the partial area extracting section comprises, a dividing section dividing the image into plural partial areas; wherein a first decision section computing a representative pixel value for each of the divided partial areas; wherein a second decision section computing a range of pixel values based on the decided representative pixel value; and wherein an extracting section extracting a partial area having a predetermined number or more of pixels whose pixel values are out of the decided range of the pixel values, from the plurality of partial areas.
 10. The image evaluation device according to claim 1, further comprising, a gray-scale section gray-scaling an image, wherein the extracted image generating section generates an extracted image from the gray-scale image.
 11. An image evaluation method, comprising: extracting plural partial areas from an image; generating plural extracted images corresponding to the plural partial areas; calculating plural autocorrelation coefficients corresponding for each of the extracted images; calculating a representative coefficient value for each of the autocorrelation coefficients among the partial areas; and checking the quality of the image based on a distribution of the representative coefficient values.
 12. The image evaluation method according to claim 11, further comprising, calculating a extent width of the distribution of the representative coefficient values, wherein in the step of determining, the quality of the image is determined based on the extent width.
 13. The image evaluation method according to claim 12, wherein in the step of checking, the quality of the image is checked by comparing the extent width with a predetermined threshold value.
 14. The image evaluation method according to claim 11, wherein the representative coefficient value of the autocorrelation coefficients is the minimum value of the autocorrelation coefficients or a value of autocorrelation coefficient in predetermined order from the minimum.
 15. The image evaluation method according to claim 14, wherein the representative coefficient value of the plural autocorrelation coefficients is replaced with a value equal to or greater than 0 when the value is less than
 0. 16. The image evaluation method according to claim 11, wherein the extracted image is extracted by extracting an edge image in the partial area.
 17. The image evaluation method according to claim 16, wherein the pixel value for each pixel in the edge image represents a gradient of pixel value in a predetermined direction or a pair of directions at the position.
 18. The image evaluation method according to claim 11, wherein the step of generating the extracted images comprises: generating an image having pixels whose pixel values correspond to the gradient of pixel values in the image; and extracting extracted images from each of the partial areas in the generated image.
 19. The image evaluation method according to claim 11, wherein the step of generating the extracted images comprises: dividing the image into a plurality of partial areas; computing a representative pixel value for each of the plurality of divided partial areas; computing a range of pixel values based on the decided representative pixel value; and extracting, from the plurality of partial areas, each having a predetermined number or more of pixels whose pixel values are outside the decided range of the pixel values.
 20. The image evaluation method according to claim 11, further comprising, gray-scaling an image, wherein in the step of generating the extracted images, an extracted image is generated from the gray-scale image. 